Add generic project metadata detection and sync#5
Merged
guodong-sq merged 12 commits intomainfrom Feb 9, 2026
Merged
Conversation
Replace hardcoded java-monorepo defaults with a user-centric flow that: - Asks which repository to manage first - Auto-detects default branch from origin/HEAD or main/master - Derives all paths from repo location (e.g., myrepo -> myrepo-master, myrepo-worktrees) - Shows derived config and allows customization
Expand beyond .ijwb to support multiple IDE/editor metadata patterns: - Add WT_METADATA_PATTERNS config variable (space-separated list) - Add WT_KNOWN_METADATA array with 16 known patterns: - JetBrains: .idea, .run, .fleet - Bazel: .ijwb, .aswb, .clwb, .bazelbsp, .bsp - Xcode/iOS: .swiftpm, xcuserdata - VS Code: .vscode - Scala: .metals, .bloop - Eclipse: .settings, .project, .classpath New scripts: - bin/wt-metadata-export: Export all configured patterns to vault - bin/wt-metadata-import: Import all configured patterns to worktree Install flow changes: - Scan repo for existing metadata directories - Interactive checkbox selection (all detected selected by default) - Save selection to WT_METADATA_PATTERNS Updated: - wt-add uses wt-metadata-import - wt.sh adds metadata-export/import commands (keeps ijwb-* as aliases) - All find commands use -L to follow symlinks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Detection now finds top-level metadata dirs only (e.g., .idea inside .ijwb is not listed separately) - Export deduplicates by sorting paths and skipping nested ones - Add tilde expansion for paths containing ~/ Algorithm: sort all found paths, keep only those not inside another kept path Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These are replaced by wt-metadata-export and wt-metadata-import. The 'wt ijwb-export' and 'wt ijwb-import' commands still work as aliases pointing to the new metadata scripts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15c755c to
607bb31
Compare
Base automatically changed from
update-install-script-and-remove-java-monorepo-specifics
to
main
February 9, 2026 02:14
Update fallback path from ~/.config/wt/ to ~/.wt/ to match PR #4's path scheme update. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix subshell variable scope bug in wt-metadata-import
(pipe to while loop caused count variable to be lost; now uses
process substitution)
- Rename wt-ijwb-refresh to wt-metadata-refresh
- Now refreshes all Bazel IDE patterns (.ijwb, .aswb, .clwb) that
are configured in WT_METADATA_PATTERNS, not just .ijwb
- Updated all references in README.md and install.sh
- Update documentation to reflect generic metadata support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.ijwbto multiple IDE/editor patternswt-metadata-exportandwt-metadata-importscriptsChanges
New Configuration
WT_METADATA_PATTERNS: Space-separated list of patterns to preserveWT_KNOWN_METADATA: Array of 16 known patterns with descriptionsSupported Patterns
.idea,.run,.fleet.ijwb,.aswb,.clwb,.bazelbsp,.bsp.swiftpm,xcuserdata.vscode.metals,.bloop.settings,.project,.classpathNew Scripts
bin/wt-metadata-export- Export all configured patterns to vaultbin/wt-metadata-import- Import all configured patterns to worktreeInstall Flow
WT_METADATA_PATTERNSBackward Compatibility
wt ijwb-exportandwt ijwb-importkept as aliases.ijwbworkflows continue to workTest plan
./install.shand verify pattern detection workswt add -b <branch>imports all selected patternswt ijwb-exportalias still works🤖 Generated with Claude Code